package com.example.demo3.service.Imp;

import com.example.demo3.entity.Employee;
import com.example.demo3.mapper.EmployeeMapper;
import com.example.demo3.service.EmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Optional;

@Service
public class EmployeeServiceImp implements EmployeeService {
    @Resource
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> finAll() {
        return null;
    }

    @Override
    public Employee finAllId(Integer id) {
        return employeeMapper.selectById(id);
    }

    @Override
    public int delEmployee(Integer id) {
        return 0;
    }

    @Override
    public Employee findByNameAndPassword(String name, String password) {
        return employeeMapper.findByNameAndPassword(name,password);
    }
}
